//
//  NetworkTool.swift
//  DSWeiBo
//
//  Created by H on 16/5/31.
//  Copyright © 2016年 Mr.Lin. All rights reserved.
//

import UIKit
import AFNetworking

class NetworkTool: AFHTTPSessionManager {

   static let tools:NetworkTool = {
        //注意 baseUrl一定要以/结尾
        let url = NSURL(string:"https://api.weibo.com/")
        let t = NetworkTool(baseURL: url)
    // 设置相应的默认反序列化格式
     t.responseSerializer.acceptableContentTypes = NSSet(objects: "application/json", "text/json", "text/javascript", "text/plain") as? Set<String>
      return t
    }()
    
    class func  shareNetworkTools() ->  NetworkTool {
        return tools
    }
}
